﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using RestSharp;
using Ymatou.ServiceCenter;

namespace WebApiDemo.Contract
{
    //[Resource("webapi.ymatou.com", "api/Default/TestPut", Method.PUT, ParameterBuildType.FormUrlEncoded)]
    //[Resource("webapi.ymatou.com", "api/Default/TestPut?id={id}&name={name}&age={age}&price={price}", Method.PUT, ParameterBuildType.UrlQueryString)]
    //[Resource("webapi.ymatou.com", "api/Default/TestPut", Method.PUT, ParameterBuildType.Json)]
    [Resource("webapi.ymatou.com", "api/Default/TestPut", Method.PUT, ParameterBuildType.UrlQueryString)]
    public class TestPutRequest
    {
         //[JsonProperty("id")]
        public string Id { get; set; }

         //[JsonProperty("name")]
        public string Name { get; set; }

        // [JsonProperty("age")]
        public int Age { get; set; }

         //[JsonProperty("price")]
        public decimal Price { get; set; }
    }

    public class TestPutResponse
    {
        public string Id { get; set; }

        public string Data { get; set; }
    }
}
